import java.util.List;

import server.core.User;
import server.dao.DAOFactory;
import server.dao.UserDAO;

public class Main {
	public static void main(String[] args) {
		DAOFactory df = DAOFactory.getInstance();
		UserDAO pd = df.getUserDAO();

		/*User p = pd.getUserByUserName("mbim0962");
		System.out.println(p.getName());*/

		List<User> list = pd.getAllUsers();

		for (int i = 0; i < list.size(); i++) {
			System.out.println(list.get(i).getUsername());
		}

		/*if (pd.checkUser("mbim0962", "magyaribea").equals("true"))
			System.out.println("talalt");
		else
			System.out.println("nem talalt");*/

		/*User user = new User();
		user.setUsername("proba");
		user.setEmail("valaki@valami.com");
		user.setGroupId(1);
		user.setName("valaki");
		user.setPassword("valaki");
		/*String error = pd.insertUser(user);
		System.out.println(error);
		user.setUsername("proba");
		user.setEmail("valaki@gmail.com");
		user.setGroupId(1);
		user.setName("valaki valaki");
		user.setPassword("pass");
		String error = pd.updateUser(user);
		System.out.println(error);
		String error = pd.deleteUser("proba");
		System.out.println(error);*/

	}
}
